﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OF.Component.BLL;
using OF.Component.Model;
using OF.Component.Base;
using OF.Utility;
using OpSystem.manage;

namespace _2010web.Manage.authority
{
    public partial class SystemList : OpBasePage
    {
        protected int intCount = 0;
        protected int intPageIndex = 1;
        protected string style = "";
        protected int Language = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            SetPageCode(101, 10102);
            if (!Page.IsPostBack)
            {

                MyBind();
            }
        }

        private void MyBind()
        {
            int count = 0;
            int intPageSize = 15;
            intPageIndex = RequestUtility.GetQueryInt("page", 1);
            string where = "1=1 and IsActive=1";
            IList<AuthoritySystemInfo> list = AuthoritySystemOperate.Search(out count, intPageIndex, intPageSize, where, "SystemID", true);
            this.rptList.DataSource = list;
            this.rptList.DataBind();
            intCount = list.Count;
            if (intCount > 0)
            {
                style = "style=\"display:none\"";

            }

            AspNetPager1.RecordCount = intCount;
            AspNetPager1.CurrentPageIndex = intPageIndex;
            AspNetPager1.PageSize = intPageSize;
        }
    }
}
